/*
 * Froce.h
 *
 *  Created on: 2022年5月14日
 *      Author: Bing
 */

#ifndef USER_DRIVES_FROCE_H_
#define USER_DRIVES_FROCE_H_

typedef unsigned char byte;
typedef struct _SET_GET_EFFECT_STRUCTURE
{
    struct
    {
        byte report_id;
        byte effect_type;
        byte byte_count; // valid only for custom force data effect.
             // custom force effects are not supported by this device.
    }SET_REPORT_REQUEST;
    struct
    {
        byte report_id; // 2
        byte effect_block_index; // index dell'effetto
        byte block_load_status; // 1 ok, 2 -out of memory, 3 JC was here, or maybe not ? case: undefined.
        int ram_pool_available;
    }PID_BLOCK_LOAD_REPORT;
    struct
    {
        byte report_id;
        byte index;
        byte Magnitude;
        byte Magnitude1;
    }READ_CONSTANT_FROCE_DATA;

    struct {
        byte report_id;
        byte index;
        byte EffectType;
        byte Duration;
        byte Duration1;
        byte RepeatInterval;
        byte RepeatInterval1;
        byte SamplePeriod;
        byte SamplePeriod1;
        byte Gain;
        byte Gain1;
        byte TrigerButton;
        byte AxesEnable;
        byte XDirection;
        byte YDirextion;
        byte Undefined;
        byte Undefined1;

    }SET_EFFECT_REPROT;

    struct {
        byte report_id;
        byte index;
        byte Control; 
        byte LoopCount;
        byte LoopCount1;
    }EFFECT_OPERATION;

    struct {
        byte report_id;
        byte Control; 
    }DEVICE_CONTROL;

    struct {
        byte report_id;
        byte Gain;
        byte Gain1;
    }GAIN_REPORT;

    struct {
        byte report_id;
        byte index;
        byte EffectType;
        byte Duration;
        byte Duration1;
        byte RepeatInterval;
        byte RepeatInterval1;
        byte SamplePeriod;
        byte SamplePeriod1;
        byte Gain;
        byte Gain1;
        byte TrigerButton;
        byte AxesEnable;
        byte XDirection;
        byte YDirextion;
        byte Undefined;
        byte Undefined1;
    }UNDEFINED_DATA;

}SET_GET_EFFECT_STRUCTURE, * PSET_GET_EFFECT_STRUCTURE;

void SetEffect(char EffectType,unsigned char * Buffer);


#endif /* USER_DRIVES_FROCE_H_ */
